package com.wypiwyl.footastic.view;

import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Point;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.util.Log;
import android.view.GestureDetector.OnGestureListener;

public class BasicLayer extends AbstractLayer {

    // declaration log
    private static final String TAG = "BasicLayer";

//    // option associee au calque
//    private final Option option;
//    
    // declaration de l'image principale
    protected final Drawable img_main;
    
    
    //
    protected Rect layout;
    
    public BasicLayer(Rect _layout, Drawable _img_main) {
        //
        this.layout = _layout;
        // initialisation de l'image principale
        this.img_main = _img_main;
        this.img_main.setBounds(getLayout());
//        //
//        this.option = _option;
    }

    @Override
    public Rect getLayout() {
        return layout;
    }

//    public void doJob(Point pointEvent, int actionEvent) {
//        // on laisse l'option faire le boulot
//        option.add();
//    }
    
    public void onDraw(Canvas canvas) {

        Log.i(TAG, this.getClass().getName() + ".onDraw" + " - BEGIN");

        // affichage du calque
//        img_main.draw(canvas);

        //
        Paint test = new Paint();
        test.setARGB(100, 255, 255, 255);
        canvas.drawRect(getLayout(), test);

        Log.i(TAG, this.getClass().getName() + ".onDraw" + " - END");
    }
}
